package com.ExaminStudy;

import java.util.Scanner;

public class DemoAnimal {
    public static void main(String[] args) {
        Scanner sc=new Scanner(System.in);
        String col=sc.next();
        int age=sc.nextInt();
        String bno=sc.next();
        String department=sc.next();
        Animal animal=new PoliceDog(col,age,bno,department);
        animal.show();
        animal.did();
    }
}
class Animal{
    String col;
    int age;

    public Animal(String col, int age) {
        this.col = col;
        this.age = age;
    }
    public void show(){
        System.out.println("颜色"+col);
        System.out.println("年龄"+age);
    }
    public void did(){}
}
class PoliceDog extends Animal{
        String bno;//编号
        String department;//所属部门

    public PoliceDog(String col, int age, String bno, String department) {
        super(col, age);
        this.bno = bno;
        this.department = department;
    }
    public void show(){
        System.out.println("编号"+bno);
        System.out.println("部门"+department);
        System.out.println("颜色"+col);
        System.out.println("年龄"+age);
    }
    public void did(){
        System.out.println("帮助警察破案");
    }
}
